function R = Expectation(nos, model)
k = model.k;
Sigma = model.Sigma;
w = model.weight;
U = model.U;
V = model.V;

[p,m] = size(nos);
X = reshape(nos - U*V',1,p*m);
[~,n] = size(X);

R = zeros(n,k);
for i = 1:k
    Si = Sigma(:,:,i);
    temp = -0.5 * Si^(-1) * X.* X;
    R(:,i) = w(i)*(det(Si)^(-1/2))*exp(temp')+eps;
end
R = R./repmat(sum(R,2),1,k);
